package com.atguigu.tingshu.common.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 *
 * @author sun
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200,"成功"),
    FAIL(201, "失败"),
    SERVICE_ERROR(202, "服务异常"),
    DATA_ERROR(203, "数据异常"),
    ILLEGAL_REQUEST(204, "非法请求"),
    REPEAT_SUBMIT(205, "重复提交"),
    ARGUMENT_VALID_ERROR(206, "参数校验异常"),

    SIGN_ERROR(207, "签名错误"),
    SIGN_VERIFY_ERROR(207,"签名验证失败"),
    SIGN_OVERDUE(207, "签名已过期"),

    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(208, "没有权限"),


    ACCOUNT_ERROR(208, "账号不正确"),
    PASSWORD_ERROR(208, "密码不正确"),
    PHONE_CODE_ERROR(208, "手机验证码不正确"),
    LOGIN_MOBILE_ERROR( 208, "账号不正确"),
    ACCOUNT_STOP( 208, "账号已停用"),

    NODE_ERROR( 209, "该节点下有子节点，不可以删除"),

    VOD_FILE_ID_ERROR( 210, "声音媒体id不正确"),

    XXL_JOB_ERROR(210, "调度操作失败"),

    ACCOUNT_LESS(220, "账户余额不足"),
    ACCOUNT_LOCK_ERROR(220, "账户余额锁定失败"),
    ACCOUNT_UNLOCK_ERROR(220, "账户余额解锁失败"),
    ACCOUNT_MINUS_LOCK_ERROR(220, "账户余额扣减失败"),

    ACCOUNT_LOCK_REPEAT(230, "重复锁定"),

    ORDER_SUBMIT_REPEAT(230, "不能重复提交订单"),
    ORDER_PAID_REPEAT(230, "订单已支付"),
    ORDER_NOT_EXIST(231, "订单不存在"),
    ORDER_CANCEL_ERROR(232, "订单取消失败"),
    ORDER_CANCEL_REPEAT(233, "订单取消重复"),
    ORDER_PAY_ERROR(234, "订单支付失败"),
    ORDER_PAY_REPEAT(235, "订单支付重复"),
    ORDER_PAY_TIMEOUT(236, "订单支付超时"),

    NO_BUY_NOT_SEE(240, "未购买不能观看"),
    REPEAT_BUY_ERROR(240, "重复购买，请确认后会下单"),
    EXIST_NO_EXPIRE_LIVE(240, "当前存在未过期直播"),

    ALBUM_SAVE_ERROR(231, "专辑保存失败"),
    ALBUM_DELETE_ERROR(232, "专辑删除失败" ),
    ALBUM_UPDAtE_ERROR(233, "专辑更新失败" ),
    ALBUM_NOT_EXIST(234, "专辑不存在" ),
    ALBUM_FREE(235, "专辑免费无需购买"),
    ALBUM_HAS_PAID(236, "专辑已购买"),

    TRACK_NOT_EXIST(241, "声音不存在" ),
    TRACK_DELETE_ERROR(242, "声音删除失败"),

    VIP_CONFIG_NOT_EXIST(243, "VIP配置不存在"),
    VIP_CONFIG_ERROR(243, "VIP配置错误"),

    USERINFO_REMOTE_CALL_ERROR(244, "远程调用用户微服务失败"),
    ORDER_INFO_REMOTE_CALL_ERROR(244, "远程调用订单微服务失败"),
    RECHARGE_INFO_REMOTE_CALL_ERROR(244, "远程调用充值微服务失败"),
    REMOTE_CALL_ERROR(244, "远程调用失败"),

    WEIXIN_PLACE_ORDER_ERROR(290, "微信下单失败");




    private final Integer code;

    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
